<template>
  <div class="test-container">
    <a-alert message="动态路由测试"></a-alert>
    <tinymce ref="editor" v-model="content" @input="getinput" />
    <user :msg="helloMsg" :myInfo="userInfo"></user>
    <!-- <user @myInfo="test"></user> -->
    <a-button type="primary" @click="test">Primary Button</a-button>
    <!-- <upload /> -->
    <addarticle />
  </div>
</template>

<script>
  import Tinymce from '@/components/tinymce'
  import user from '@/components/form/user'
  // import upload from '@/components/form/upload'
  import addarticle from '@/components/form/addarticle'
  import { ref, reactive } from 'vue'
  export default {
    components: {
      Tinymce,
      user,
      // upload,
      addarticle,
    },
    // data() {
    //   return {
    //     content: '',
    //     // baseUrl: window.baseUrl,
    //   }
    // },
    setup() {
      const content = ref('')
      const helloMsg = ref('你好')
      const userInfo = reactive({
        name: '你好',
        email: '78@163.com',
      })
      const getinput = (val) => {
        content.value = val
      }
      const test = () => {
        console.log(content.value)
      }
      // const tests = ref({
      //   name: '你好',
      //   email: '78@163.com',
      // })
      // console.log(tests.value.name)
      // const test = (info) => {
      //   console.log(info)
      // }
      return {
        content,
        helloMsg,
        userInfo,
        test,
        getinput,
      }
    },
  }
</script>

<style></style>
